<footer class="site-footer">
  <div class="site-footer-contents">{{ translation.made_by | replace: "MAINSITE_LINK", site.mainsite_link | markdownify | remove: '<p>' | remove: '</p>' }}</div>
  <div class="site-footer-contents">{{ translation.feedback | replace: "MAILTO_LINK", site.mailto_link | markdownify | remove: '<p>' | remove: '</p>' }}</div></span>
  <div class="site-footer-contents">{{ translation.language }}
    <select name="language" onchange="location = this.value">
      {% assign pages=site.pages | where:"ref", page.ref | sort: 'lang' %}

      {% for p in pages %}
      {% assign p_translation = site.data.translations.[p.lang] %}

      {% if p.lang == "en" %}
      {% assign lang = p_translation.lang_name %}
      {% else %}
      {% assign lang = p_translation.lang_name | append: " — (" | append: p_translation.lang_name_eng | append: ")" %}
      {% endif %}

      {% if p.url == page.url %}
      <option selected value="{{ p.url }}">{{ lang }}</option>
      {% else %}
      <option value="{{ p.url }}">{{ lang }}</option>
      {% endif %}
      {% endfor %}
    </select>
  </div>
</footer>
